package com.zy.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.zy.entity.DepartUser;
import com.zy.entity.EmailUser;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;

/**
 * Created with IntelliJ IDEA.
 * @Auther: 杨深俊
 * @Date: 2021/04/14/14:59
 * @Description: 
 */
@Repository
@Mapper
public interface ZyDepartUserMapper extends BaseMapper<DepartUser> {
    //查询所有部门
    @Select("select u.name,d.department_id,d.department_name,d.manager_id from department d,user u where u.id=d.manager_id order by d.department_id")
    public IPage<DepartUser> getDepartUsers(IPage<DepartUser> departs);
}
